﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using Digitalmes.Model.AndonManagement;
using Digitalmes.Model;

namespace Digitalmes.ViewModel.AndonManagement.AndonStationHeaderVMs
{
    public partial class AndonStationHeaderTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._AndonStationHeader._Station")]
        public ExcelPropety Station_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.StationId);
        [Display(Name = "_Model._AndonStationHeader._HeaderRole")]
        public ExcelPropety HeaderRole_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.HeaderRole);
        [Display(Name = "_Model._AndonStationHeader._Header")]
        public ExcelPropety Header_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.Header);
        [Display(Name = "_Model._AndonStationHeader._ContactNumber")]
        public ExcelPropety ContactNumber_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.ContactNumber);
        [Display(Name = "_Model._AndonStationHeader._CreateTime")]
        public ExcelPropety CreateTime_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.CreateTime, true);
        [Display(Name = "_Model._AndonStationHeader._UpdateTime")]
        public ExcelPropety UpdateTime_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.UpdateTime, true);
        [Display(Name = "_Model._AndonStationHeader._CreateBy")]
        public ExcelPropety CreateBy_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.CreateBy);
        [Display(Name = "_Model._AndonStationHeader._UpdateBy")]
        public ExcelPropety UpdateBy_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.UpdateBy);
        [Display(Name = "_Model._AndonStationHeader._IsValid")]
        public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.IsValid);
        [Display(Name = "_Model._AndonStationHeader._TenantCode")]
        public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<AndonStationHeader>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            Station_Excel.DataType = ColumnDataType.ComboBox;
            Station_Excel.ListItems = DC.Set<AndonStation>().GetSelectListItems(Wtm, y => y.TenantCode.ToString());

        }

    }

    public class AndonStationHeaderImportVM : BaseImportVM<AndonStationHeaderTemplateVM, AndonStationHeader>
    {
            //import

    }

}